package lk.icta.common.service;

import lk.icta.common.entity.DSDivision;
import lk.icta.common.entity.GNDivision;
import lk.icta.user.entity.User;
import org.springframework.mail.SimpleMailMessage;

import java.util.ArrayList;
import java.util.Set;
import java.util.List;

/**
 * @author Kusal Samarakoon
 * @author Supun Viraj Rathnayaka
 */

public interface MailSenderService {

    /**
     * Sending a mail
     *
     * @param from    from email address
     * @param to      to email address
     * @param subject The Subject if the mail
     * @param msg     The Sending massage
     */
    public boolean sendMail(String from, String to, String subject, String msg);

    /**
        * Notify all parties in application approval or rejection
        *
        * @param GNDiv GN Division
        * @param user    user responsible for the approval or rejection
        * @param emailSubject  subject of the email
        * @param emailedMessage  approval or rejection message
        */
     public void notifyToAll(GNDivision GNDiv, User user, String emailSubject, String emailedMessage);


    /**
        * Notify all parties in application approval or rejection
        *
        * @param DSDivs  DS Divisions
        * @param user    user responsible for the approval or rejection
        * @param status  approval or rejection
        */
     public void notifyToAll(Set<DSDivision> DSDivs, User user, String status);

    /**
        * Notify all parties in application approval or rejection
        *
        * @param dsDivs  DS Divisions Set
        * @param searchedRoles  searched roles for emails to be sent.
        * @param user    user responsible for the approval or rejection
        * @param emailSubject  Subject of the email.
        * @param emailedMessage  Content of the email.
      */
     public void notifyToAll(Set<DSDivision> dsDivs,List<String> searchedRoles , User user, String emailSubject, String emailedMessage);

     public void send(ArrayList<SimpleMailMessage> simpleMessage);

}
